const http = require('http');
const urlib = require('url');

const server = http.createServer((req, res) => {
    console.log(urlib.parse(req.url, true));
    res.write(urlib.parse(req.url).toString());

    res.end();
}).listen(9000, () => {
    console.log('访问成功!');
});